<?php
    include 'db.php';
    $db = new db();
    $result = $db->query("SELECT * FROM user_names");
    $responce->page = "1";
    $responce->total = "2";
    $responce->records = "2";
    $i=0;
    while($row = mysql_fetch_array($result)) {
        $responce->rows[$i]['id']= "$i";
        $responce->rows[$i]['cell']=array($row['user'],$row['password']);
        $i++;
    }
    echo json_encode($responce);
?>
